#include <algorithm>
#include <cstring>
#include <iostream>
using namespace std;
using ll = long long;
using T = int;
T rad(); // quick read
const int inf = 0x3f3f3f3f;
#define rf(i, n) for (int i = 1; i <= (n); ++i)
const int max_size = 5 + 100;
const int maxn = 5 + 100;

int c(int n, int m) {
    int ret = 1;
    for (int dwn = 1, up = n; dwn <= m; ++dwn, --up) {
        ret = ret * up / dwn;
    }
    return ret;
}

int main() {
    int q = rad();
    rf(i, q) {
        int r = rad(), b = rad();
        int up = c(r, 2), dwn = c(r + b, 2);
        int g = __gcd(up, dwn);
        printf("Case #%d: %d/%d\n", i, up / g, dwn / g);
    }
}

T rad() {
    T back = 0;
    int ch = 0, posi = 0;
    for (; ch < '0' || ch > '9'; ch = getchar())
        posi = ch ^ '-';
    for (; ch >= '0' && ch <= '9'; ch = getchar())
        back = (back << 1) + (back << 3) + (ch & 0xf);
    return posi ? back : -back;
}